const express = require('express');
const router = express.Router();
const taskController = require('../controllers/taskController');

router.get('/', taskController.getAllTasks);
router.get('/:id', taskController.getTaskById); // 新增详情路由
router.post('/', taskController.createTask);
router.put('/:id', taskController.updateTask);
router.delete('/:id', taskController.deleteTask);
router.patch('/:id/priority', taskController.updatePriority); // 新增优先级更新路由
router.patch('/:id/status', taskController.updateStatus);
router.patch('/:id/feedback', taskController.updateFeedback);

module.exports = router;
